package org.dwell.urlfilter.demo.controller;

import org.dwell.urlfilter.demo.vo.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by Jange on 2016/4/6.
 */
@Controller
@RequestMapping(value = "/extpay/member")
public class MemberController {

    @RequestMapping(value = "/info", method = RequestMethod.GET)
    public String index() {
        return "memberinfo";
    }

    @RequestMapping(value = "/create", method = RequestMethod.GET)
    public String create() {
        return "membercreate";
    }

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ResponseBody
    public Result add(String memberName, String memberPhone, String memberLevel) {
        System.out.println("新增会员功能 memberName ~ " + memberName);
        System.out.println("新增会员功能 memberPhone ~ " + memberPhone);
        System.out.println("新增会员功能 memberLevel ~ " + memberLevel);
        return Result.ok("新增成功");
    }
}
